/**
 * 使用export命令定义了模块的对外接口以后，其他 JS 文件就可以通过import命令加载这个模块
 * 学习使用import
 * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import
 * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export
 */
import { firstName, secondName, age } from './moduleB.js';

function getName() {
  const name = `${firstName}, ${secondName}`; // let name = firstName + secondName;
  console.log(name);
  document.body.append(name);
  return name;
}

function setName(first = 'He', second = 'Yan', year = 1988) {
  console.log(first, second, year);
  document.body.append(`${first}, ${second}, ${2018 - year}`);
}

getName();

setName();

setName('fujie', 'kobe', 12);